package su.NewFeatureType;

import su.Ner.NerDataSequence;
import iitb.CRF.DataSequence;
import iitb.Model.Edge;
import iitb.Model.FeatureGenImpl;
import iitb.Model.FeatureImpl;

@SuppressWarnings("serial")
public class PS_CCFeatures extends TransitionFeatures{

	public PS_CCFeatures(FeatureGenImpl fgen, int baseId) {
		super(fgen, baseId, NerDataSequence.labelNum*2*NerDataSequence.labelNum);
	}

	@Override
	public boolean startScanFeaturesAt(DataSequence data, int prevPos, int pos) {
		if(0==pos){
			edgeIter=null;
			return false;
		}
		char c=((String)data.x(pos)).charAt(0);
		if( ! Character.isLetter(c) ){
			edgeIter=null;
			return false;
		}
		edgeIter=new EdgeIter(NerDataSequence.labelNum);
		String _case;
		if(Character.isUpperCase(c)){
			_case="UC";
			tokenId=1;
		}
		else{
			_case="LC";
			tokenId=0;
		}
		fname="PS_CC."+_case;
		return true;
	}

}
